package com.example.myapplication.request

import androidx.lifecycle.MutableLiveData
import com.example.myapplication.bean.tools.CommonWebsiteBean
import com.kun.base.net.Api
import com.kun.base.net.ResponseResult

/**
 *工具相关的请求
 *
 * @author : Kun
 * @date : 2021/6/9
 * @time : 10:51
 */
class ToolsRequest {
    /**
     * 常用网站返回的结果
     */
    val commonWebsiteResult = MutableLiveData<ResponseResult<List<CommonWebsiteBean>>>()

    /**
     * 获取常用网站
     */
    suspend fun requestCommonWebsite(){
        commonWebsiteResult.value=Api.apiCall {
            Api.getInstance(IApi::class.java).getCommonWebsite()
        }
    }
}